package thesis.javaclass;

import java.util.HashMap;

public class ServiceList {// phone,///request

	private static HashMap<String, Boolean> busyImeis = new HashMap<String, Boolean>();

	private static HashMap<String, ServiceRequest> list = new HashMap<String, ServiceRequest>();

	public static void add(String phone, ServiceRequest serRes) {
		list.put(phone, serRes);
	}

	public static ServiceRequest get(String phone) {
		return list.get(phone);
	}

	public static void setBusy(String imei) {
		busyImeis.put(imei, true);
	}

	public static void setFree(String imei) {
		busyImeis.put(imei, false);
	}

	public static boolean isBusy(String imei) {
		if (busyImeis.containsKey(imei))
			return busyImeis.get(imei);
		return false;
	}

}
